#pragma once

#include <memory>
#include <mutex>
#include "Image.h"

/// <summary>
/// proxy class
/// </summary>
class ImageProxy : public IImage
{
public:
	static std::shared_ptr<IImage> New(const std::string& realImage, const std::string& placeholderImage);
	virtual void Draw() override;
private:
	ImageProxy(const std::string& placeholderImage);	
private:
	void Load(const std::string& realImage);
private:
	std::shared_ptr<Image> _image;
	std::mutex _mutex;
};